#ifndef __INETADDRESS_H_
#define __INETADDRESS_H_

#include <func.h>
#include <string>

using std::string;

namespace ln{

class InetAddress{
public:
    InetAddress(unsigned short port,const string & ip = "127.0.0.1");
    explicit InetAddress (const struct sockaddr_in &);

    string ip() const;
    unsigned short port() const;
    struct sockaddr_in * getInetAddressPtr() { return & _addr; }

private:
    struct sockaddr_in _addr;
};

}//end of namespace ln

#endif

